<?php
declare(strict_types=1);

namespace app\admin\controller;

use app\admin\service\IndustryCateService;
use app\AdminController;

/**
 * 行业分类
 * Class IndustryCate
 * @package app\admin\controller
 */
class IndustryCate extends AdminController
{
    /**
     * 获取二级分类
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getChildrenCate()
    {
        $city = IndustryCateService::getIndustryCate(intval($this->request->param('pid')));
        return adminResponseJson($city, 1);
    }
}